Method: Arel::Table#[]

Defined in:
activerecord/lib/arel/table.rb

#[](name, table = self) ⇒ Object

[View source]

82
83
84
85
86
# File 'activerecord/lib/arel/table.rb', line 82

def [](name, table = self)
  name = name.to_s if name.is_a?(Symbol)
  name = @klass.attribute_aliases[name] || name if @klass
  Attribute.new(table, name)
end